using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ModChatRoomTopic : GeneratedMessageLite<ModChatRoomTopic, ModChatRoomTopic.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ModChatRoomTopic, ModChatRoomTopic.Builder>
		{
			private bool resultIsReadOnly;
			private ModChatRoomTopic result;
			protected override ModChatRoomTopic.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ModChatRoomTopic MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ModChatRoomTopic DefaultInstanceForType
			{
				get
				{
					return ModChatRoomTopic.DefaultInstance;
				}
			}
			public SKBuiltinString_t ChatRoomName
			{
				get
				{
					return this.result.ChatRoomName;
				}
				set
				{
					this.SetChatRoomName(value);
				}
			}
			public SKBuiltinString_t ChatRoomTopic
			{
				get
				{
					return this.result.ChatRoomTopic;
				}
				set
				{
					this.SetChatRoomTopic(value);
				}
			}
			public Builder()
			{
				this.result = ModChatRoomTopic.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ModChatRoomTopic cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ModChatRoomTopic PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ModChatRoomTopic other = this.result;
					this.result = new ModChatRoomTopic();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ModChatRoomTopic.Builder Clear()
			{
				this.result = ModChatRoomTopic.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ModChatRoomTopic.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ModChatRoomTopic.Builder(this.result);
				}
				return new ModChatRoomTopic.Builder().MergeFrom(this.result);
			}
			public override ModChatRoomTopic BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ModChatRoomTopic.Builder MergeFrom(IMessageLite other)
			{
				if (other is ModChatRoomTopic)
				{
					return this.MergeFrom((ModChatRoomTopic)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ModChatRoomTopic.Builder MergeFrom(ModChatRoomTopic other)
			{
				return this;
			}
			public override ModChatRoomTopic.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ModChatRoomTopic.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ModChatRoomTopic._modChatRoomTopicFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ModChatRoomTopic._modChatRoomTopicFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasChatRoomTopic)
							{
								builder.MergeFrom(this.ChatRoomTopic);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.ChatRoomTopic = builder.BuildPartial();
						}
					}
					else
					{
						SKBuiltinString_t.Builder builder2 = SKBuiltinString_t.CreateBuilder();
						if (this.result.hasChatRoomName)
						{
							builder2.MergeFrom(this.ChatRoomName);
						}
						input.ReadMessage(builder2, extensionRegistry);
						this.ChatRoomName = builder2.BuildPartial();
					}
				}
				return this;
			}
			public ModChatRoomTopic.Builder SetChatRoomName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasChatRoomName = true;
				this.result.chatRoomName_ = value;
				return this;
			}
			public ModChatRoomTopic.Builder SetChatRoomName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasChatRoomName = true;
				this.result.chatRoomName_ = builderForValue.Build();
				return this;
			}
			public ModChatRoomTopic.Builder MergeChatRoomName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasChatRoomName && this.result.chatRoomName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.chatRoomName_ = SKBuiltinString_t.CreateBuilder(this.result.chatRoomName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.chatRoomName_ = value;
				}
				this.result.hasChatRoomName = true;
				return this;
			}
			public ModChatRoomTopic.Builder ClearChatRoomName()
			{
				this.PrepareBuilder();
				this.result.hasChatRoomName = false;
				this.result.chatRoomName_ = null;
				return this;
			}
			public ModChatRoomTopic.Builder SetChatRoomTopic(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasChatRoomTopic = true;
				this.result.chatRoomTopic_ = value;
				return this;
			}
			public ModChatRoomTopic.Builder SetChatRoomTopic(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasChatRoomTopic = true;
				this.result.chatRoomTopic_ = builderForValue.Build();
				return this;
			}
			public ModChatRoomTopic.Builder MergeChatRoomTopic(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasChatRoomTopic && this.result.chatRoomTopic_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.chatRoomTopic_ = SKBuiltinString_t.CreateBuilder(this.result.chatRoomTopic_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.chatRoomTopic_ = value;
				}
				this.result.hasChatRoomTopic = true;
				return this;
			}
			public ModChatRoomTopic.Builder ClearChatRoomTopic()
			{
				this.PrepareBuilder();
				this.result.hasChatRoomTopic = false;
				this.result.chatRoomTopic_ = null;
				return this;
			}
		}
		public const int ChatRoomNameFieldNumber = 1;
		public const int ChatRoomTopicFieldNumber = 2;
		private static readonly ModChatRoomTopic defaultInstance;
		private static readonly string[] _modChatRoomTopicFieldNames;
		private static readonly uint[] _modChatRoomTopicFieldTags;
		private bool hasChatRoomName;
		private SKBuiltinString_t chatRoomName_;
		private bool hasChatRoomTopic;
		private SKBuiltinString_t chatRoomTopic_;
		private int memoizedSerializedSize = -1;
		public static ModChatRoomTopic DefaultInstance
		{
			get
			{
				return ModChatRoomTopic.defaultInstance;
			}
		}
		public override ModChatRoomTopic DefaultInstanceForType
		{
			get
			{
				return ModChatRoomTopic.DefaultInstance;
			}
		}
		protected override ModChatRoomTopic ThisMessage
		{
			get
			{
				return this;
			}
		}
		public SKBuiltinString_t ChatRoomName
		{
			get
			{
				return this.chatRoomName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public SKBuiltinString_t ChatRoomTopic
		{
			get
			{
				return this.chatRoomTopic_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasChatRoomName && this.hasChatRoomTopic;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasChatRoomName)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.ChatRoomName);
				}
				if (this.hasChatRoomTopic)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.ChatRoomTopic);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ModChatRoomTopic()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] modChatRoomTopicFieldNames = ModChatRoomTopic._modChatRoomTopicFieldNames;
			if (this.hasChatRoomName)
			{
				output.WriteMessage(1, modChatRoomTopicFieldNames[0], this.ChatRoomName);
			}
			if (this.hasChatRoomTopic)
			{
				output.WriteMessage(2, modChatRoomTopicFieldNames[1], this.ChatRoomTopic);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasChatRoomName)
			{
				num ^= this.chatRoomName_.GetHashCode();
			}
			if (this.hasChatRoomTopic)
			{
				num ^= this.chatRoomTopic_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ModChatRoomTopic modChatRoomTopic = value as ModChatRoomTopic;
			return modChatRoomTopic != null && (this.hasChatRoomName == modChatRoomTopic.hasChatRoomName && (!this.hasChatRoomName || this.chatRoomName_.Equals(modChatRoomTopic.chatRoomName_))) && (this.hasChatRoomTopic == modChatRoomTopic.hasChatRoomTopic && (!this.hasChatRoomTopic || this.chatRoomTopic_.Equals(modChatRoomTopic.chatRoomTopic_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ModChatRoomTopic, ModChatRoomTopic.Builder>.PrintField("ChatRoomName", this.hasChatRoomName, this.chatRoomName_, writer);
			GeneratedMessageLite<ModChatRoomTopic, ModChatRoomTopic.Builder>.PrintField("ChatRoomTopic", this.hasChatRoomTopic, this.chatRoomTopic_, writer);
		}
		public static ModChatRoomTopic ParseFrom(byte[] data)
		{
			return ModChatRoomTopic.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ModChatRoomTopic MakeReadOnly()
		{
			return this;
		}
		public static ModChatRoomTopic.Builder CreateBuilder()
		{
			return new ModChatRoomTopic.Builder();
		}
		public override ModChatRoomTopic.Builder ToBuilder()
		{
			return ModChatRoomTopic.CreateBuilder(this);
		}
		public override ModChatRoomTopic.Builder CreateBuilderForType()
		{
			return new ModChatRoomTopic.Builder();
		}
		public static ModChatRoomTopic.Builder CreateBuilder(ModChatRoomTopic prototype)
		{
			return new ModChatRoomTopic.Builder(prototype);
		}
		static ModChatRoomTopic()
		{
			ModChatRoomTopic.defaultInstance = new ModChatRoomTopic().MakeReadOnly();
			ModChatRoomTopic._modChatRoomTopicFieldNames = new string[]
			{
				"ChatRoomName",
				"ChatRoomTopic"
			};
			ModChatRoomTopic._modChatRoomTopicFieldTags = new uint[]
			{
				10u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.ModChatRoomTopic.Descriptor, null);
		}
	}
}
